package com.mangguo.tingjian.content.mapper;

import com.mangguo.tingjian.content.entity.TagConf;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 内容数据页tag配置 Mapper 接口
 * </p>
 *
 * @author auto
 * @since 2019-11-24
 */
@Mapper
public interface TagConfMapper extends BaseMapper<TagConf> {
    @Select("select * from content_tag_conf where tagLvl = #{tagLvl} and type = #{type}")
    List<TagConf> selectTagConfByTypeAndTagLvl(@Param("type") Integer type, @Param("tagLvl") Integer tagLvl);

    @Select("select * from content_tag_conf where type = #{type} and parentTagId = #{parentId}")
    List<TagConf> selectTagConfByTypeAndParentId(@Param("type") Integer type, @Param("parentId") Long parentId);
}
